package com.payment.ktb.dialog;

import android.content.Context;
import android.graphics.Color;
import android.text.Html;
import android.view.View;
import android.widget.TextView;

import com.flyco.animation.Attention.Swing;
import com.flyco.dialog.utils.CornerUtils;
import com.flyco.dialog.widget.base.BaseDialog;
import com.payment.ktb.R;

import butterknife.BindView;
import butterknife.ButterKnife;

public class CustomBaseDialog extends BaseDialog<CustomBaseDialog> {

    @BindView(R.id.tv_testerror)
    TextView tv_testerror;

    private String content;

    public CustomBaseDialog(Context context,String content) {
        super(context);
        this.content = content;
    }

    @Override
    public View onCreateView() {
       // widthScale(0.85f);
        showAnim(new Swing());

        // dismissAnim(this, new ZoomOutExit());
        View inflate = View.inflate(mContext, R.layout.activity_testerror, null);
        ButterKnife.bind(this, inflate);
        inflate.setBackgroundDrawable(
                CornerUtils.cornerDrawable(Color.parseColor("#ffffff"), dp2px(5)));

        return inflate;
    }

    @Override
    public void setUiBeforShow() {

        tv_testerror.setText(Html.fromHtml(content));


    }
}
